package com.dawn.module.hospital.model.pay.bill;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 微信医保账单表
 * @TableName t_bill_wx_chs
 */
@Data
public class BillWxChs  implements Serializable {

    private static final long serialVersionUID = -845387809168326017L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 支付平台应用ID
     */
    private String payCenterAppId;

    /**
     * 支付平台商户号
     */
    private String payCenterMchNo;

    /**
     * 对账配置Id
     */
    private Long reconConfigId;

    /**
     * 账单日日期
     */
    private String billDate;

    /**
     * 状态: 0-停用, 1-启用
     */
    private String appId;

    /**
     * 备注
     */
    private String mchId;

    /**
     * 
     */
    private String openId;

    /**
     * 业务
     */
    private String body;

    /**
     * 
     */
    private String mchOrderNo;

    /**
     * 
     */
    private String transactionId;

    /**
     * 
     */
    private String outTradeNo;

    /**
     * 
     */
    private String totalFee;

    /**
     * 
     */
    private String tradeType;

    /**
     * 
     */
    private String tradeState;

    /**
     * 
     */
    private String refundId;

    /**
     * 
     */
    private String outRefundNo;

    /**
     * 
     */
    private String refundFee;

    /**
     * 
     */
    private String bankType;

    /**
     * 
     */
    private String feeType;

    /**
     * 交易时间
     */
    private String tradeTime;

    /**
     * 
     */
    private String refundChannel;

    /**
     * 商户号
     */
    private String subMchId;

    /**
     * his账单实现接口
     */
    private String deviceInfo;

    /**
     * 
     */
    private String refundStatus;

    /**
     * 
     */
    private String productName;

    /**
     * 
     */
    private String mchPacket;

    /**
     * 
     */
    private String serviceCharge;

    /**
     * 
     */
    private String settlementTotalFee;

    /**
     * 
     */
    private String settlementRefundFee;

    /**
     * 
     */
    private String rate;

    /**
     * 
     */
    private String couponFee;

    /**
     * 
     */
    private String couponRefundFee;

    /**
     * 
     */
    private Date refundApplyTime;

    /**
     * 
     */
    private Date refundSuccessTime;

    /**
     * 
     */
    private String remark;

    /**
     * 医保支付流水
     */
    private String insurancePayNo;

    /**
     * 医院订单号
     */
    private String hospNo;

    /**
     * 医保业务流水号
     */
    private String serialNo;

    /**
     * 医疗机构编码
     */
    private String orgNo;

    /**
     * 医疗机构名称
     */
    private String hospName;

    /**
     * 支付订单号
     */
    private String payOrderId;

    /**
     * 订单状态
     */
    private String payState;

    /**
     * 支付时间
     */
    private String payTime;

    /**
     * 订单总金额
     */
    private String fee;

    /**
     * 订单自费金额
     */
    private String cashFee;

    /**
     * 订单医保金额
     */
    private String insuranceFee;

    /**
     * 微信医保支付总单号
     */
    private String medTransId;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BillWxChs other = (BillWxChs) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPayCenterAppId() == null ? other.getPayCenterAppId() == null : this.getPayCenterAppId().equals(other.getPayCenterAppId()))
            && (this.getPayCenterMchNo() == null ? other.getPayCenterMchNo() == null : this.getPayCenterMchNo().equals(other.getPayCenterMchNo()))
            && (this.getReconConfigId() == null ? other.getReconConfigId() == null : this.getReconConfigId().equals(other.getReconConfigId()))
            && (this.getBillDate() == null ? other.getBillDate() == null : this.getBillDate().equals(other.getBillDate()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId()))
            && (this.getOpenId() == null ? other.getOpenId() == null : this.getOpenId().equals(other.getOpenId()))
            && (this.getBody() == null ? other.getBody() == null : this.getBody().equals(other.getBody()))
            && (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
            && (this.getTotalFee() == null ? other.getTotalFee() == null : this.getTotalFee().equals(other.getTotalFee()))
            && (this.getTradeType() == null ? other.getTradeType() == null : this.getTradeType().equals(other.getTradeType()))
            && (this.getTradeState() == null ? other.getTradeState() == null : this.getTradeState().equals(other.getTradeState()))
            && (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId()))
            && (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
            && (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee()))
            && (this.getBankType() == null ? other.getBankType() == null : this.getBankType().equals(other.getBankType()))
            && (this.getFeeType() == null ? other.getFeeType() == null : this.getFeeType().equals(other.getFeeType()))
            && (this.getTradeTime() == null ? other.getTradeTime() == null : this.getTradeTime().equals(other.getTradeTime()))
            && (this.getRefundChannel() == null ? other.getRefundChannel() == null : this.getRefundChannel().equals(other.getRefundChannel()))
            && (this.getSubMchId() == null ? other.getSubMchId() == null : this.getSubMchId().equals(other.getSubMchId()))
            && (this.getDeviceInfo() == null ? other.getDeviceInfo() == null : this.getDeviceInfo().equals(other.getDeviceInfo()))
            && (this.getRefundStatus() == null ? other.getRefundStatus() == null : this.getRefundStatus().equals(other.getRefundStatus()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getMchPacket() == null ? other.getMchPacket() == null : this.getMchPacket().equals(other.getMchPacket()))
            && (this.getServiceCharge() == null ? other.getServiceCharge() == null : this.getServiceCharge().equals(other.getServiceCharge()))
            && (this.getSettlementTotalFee() == null ? other.getSettlementTotalFee() == null : this.getSettlementTotalFee().equals(other.getSettlementTotalFee()))
            && (this.getSettlementRefundFee() == null ? other.getSettlementRefundFee() == null : this.getSettlementRefundFee().equals(other.getSettlementRefundFee()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
            && (this.getCouponFee() == null ? other.getCouponFee() == null : this.getCouponFee().equals(other.getCouponFee()))
            && (this.getCouponRefundFee() == null ? other.getCouponRefundFee() == null : this.getCouponRefundFee().equals(other.getCouponRefundFee()))
            && (this.getRefundApplyTime() == null ? other.getRefundApplyTime() == null : this.getRefundApplyTime().equals(other.getRefundApplyTime()))
            && (this.getRefundSuccessTime() == null ? other.getRefundSuccessTime() == null : this.getRefundSuccessTime().equals(other.getRefundSuccessTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getInsurancePayNo() == null ? other.getInsurancePayNo() == null : this.getInsurancePayNo().equals(other.getInsurancePayNo()))
            && (this.getHospNo() == null ? other.getHospNo() == null : this.getHospNo().equals(other.getHospNo()))
            && (this.getSerialNo() == null ? other.getSerialNo() == null : this.getSerialNo().equals(other.getSerialNo()))
            && (this.getOrgNo() == null ? other.getOrgNo() == null : this.getOrgNo().equals(other.getOrgNo()))
            && (this.getHospName() == null ? other.getHospName() == null : this.getHospName().equals(other.getHospName()))
            && (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId()))
            && (this.getPayState() == null ? other.getPayState() == null : this.getPayState().equals(other.getPayState()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getCashFee() == null ? other.getCashFee() == null : this.getCashFee().equals(other.getCashFee()))
            && (this.getInsuranceFee() == null ? other.getInsuranceFee() == null : this.getInsuranceFee().equals(other.getInsuranceFee()))
            && (this.getMedTransId() == null ? other.getMedTransId() == null : this.getMedTransId().equals(other.getMedTransId()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPayCenterAppId() == null) ? 0 : getPayCenterAppId().hashCode());
        result = prime * result + ((getPayCenterMchNo() == null) ? 0 : getPayCenterMchNo().hashCode());
        result = prime * result + ((getReconConfigId() == null) ? 0 : getReconConfigId().hashCode());
        result = prime * result + ((getBillDate() == null) ? 0 : getBillDate().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode());
        result = prime * result + ((getOpenId() == null) ? 0 : getOpenId().hashCode());
        result = prime * result + ((getBody() == null) ? 0 : getBody().hashCode());
        result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
        result = prime * result + ((getTotalFee() == null) ? 0 : getTotalFee().hashCode());
        result = prime * result + ((getTradeType() == null) ? 0 : getTradeType().hashCode());
        result = prime * result + ((getTradeState() == null) ? 0 : getTradeState().hashCode());
        result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode());
        result = prime * result + ((getOutRefundNo() == null) ? 0 : getOutRefundNo().hashCode());
        result = prime * result + ((getRefundFee() == null) ? 0 : getRefundFee().hashCode());
        result = prime * result + ((getBankType() == null) ? 0 : getBankType().hashCode());
        result = prime * result + ((getFeeType() == null) ? 0 : getFeeType().hashCode());
        result = prime * result + ((getTradeTime() == null) ? 0 : getTradeTime().hashCode());
        result = prime * result + ((getRefundChannel() == null) ? 0 : getRefundChannel().hashCode());
        result = prime * result + ((getSubMchId() == null) ? 0 : getSubMchId().hashCode());
        result = prime * result + ((getDeviceInfo() == null) ? 0 : getDeviceInfo().hashCode());
        result = prime * result + ((getRefundStatus() == null) ? 0 : getRefundStatus().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getMchPacket() == null) ? 0 : getMchPacket().hashCode());
        result = prime * result + ((getServiceCharge() == null) ? 0 : getServiceCharge().hashCode());
        result = prime * result + ((getSettlementTotalFee() == null) ? 0 : getSettlementTotalFee().hashCode());
        result = prime * result + ((getSettlementRefundFee() == null) ? 0 : getSettlementRefundFee().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        result = prime * result + ((getCouponFee() == null) ? 0 : getCouponFee().hashCode());
        result = prime * result + ((getCouponRefundFee() == null) ? 0 : getCouponRefundFee().hashCode());
        result = prime * result + ((getRefundApplyTime() == null) ? 0 : getRefundApplyTime().hashCode());
        result = prime * result + ((getRefundSuccessTime() == null) ? 0 : getRefundSuccessTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getInsurancePayNo() == null) ? 0 : getInsurancePayNo().hashCode());
        result = prime * result + ((getHospNo() == null) ? 0 : getHospNo().hashCode());
        result = prime * result + ((getSerialNo() == null) ? 0 : getSerialNo().hashCode());
        result = prime * result + ((getOrgNo() == null) ? 0 : getOrgNo().hashCode());
        result = prime * result + ((getHospName() == null) ? 0 : getHospName().hashCode());
        result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode());
        result = prime * result + ((getPayState() == null) ? 0 : getPayState().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getCashFee() == null) ? 0 : getCashFee().hashCode());
        result = prime * result + ((getInsuranceFee() == null) ? 0 : getInsuranceFee().hashCode());
        result = prime * result + ((getMedTransId() == null) ? 0 : getMedTransId().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", payCenterAppId=").append(payCenterAppId);
        sb.append(", payCenterMchNo=").append(payCenterMchNo);
        sb.append(", reconConfigId=").append(reconConfigId);
        sb.append(", billDate=").append(billDate);
        sb.append(", appId=").append(appId);
        sb.append(", mchId=").append(mchId);
        sb.append(", openId=").append(openId);
        sb.append(", body=").append(body);
        sb.append(", mchOrderNo=").append(mchOrderNo);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", outTradeNo=").append(outTradeNo);
        sb.append(", totalFee=").append(totalFee);
        sb.append(", tradeType=").append(tradeType);
        sb.append(", tradeState=").append(tradeState);
        sb.append(", refundId=").append(refundId);
        sb.append(", outRefundNo=").append(outRefundNo);
        sb.append(", refundFee=").append(refundFee);
        sb.append(", bankType=").append(bankType);
        sb.append(", feeType=").append(feeType);
        sb.append(", tradeTime=").append(tradeTime);
        sb.append(", refundChannel=").append(refundChannel);
        sb.append(", subMchId=").append(subMchId);
        sb.append(", deviceInfo=").append(deviceInfo);
        sb.append(", refundStatus=").append(refundStatus);
        sb.append(", productName=").append(productName);
        sb.append(", mchPacket=").append(mchPacket);
        sb.append(", serviceCharge=").append(serviceCharge);
        sb.append(", settlementTotalFee=").append(settlementTotalFee);
        sb.append(", settlementRefundFee=").append(settlementRefundFee);
        sb.append(", rate=").append(rate);
        sb.append(", couponFee=").append(couponFee);
        sb.append(", couponRefundFee=").append(couponRefundFee);
        sb.append(", refundApplyTime=").append(refundApplyTime);
        sb.append(", refundSuccessTime=").append(refundSuccessTime);
        sb.append(", remark=").append(remark);
        sb.append(", insurancePayNo=").append(insurancePayNo);
        sb.append(", hospNo=").append(hospNo);
        sb.append(", serialNo=").append(serialNo);
        sb.append(", orgNo=").append(orgNo);
        sb.append(", hospName=").append(hospName);
        sb.append(", payOrderId=").append(payOrderId);
        sb.append(", payState=").append(payState);
        sb.append(", payTime=").append(payTime);
        sb.append(", fee=").append(fee);
        sb.append(", cashFee=").append(cashFee);
        sb.append(", insuranceFee=").append(insuranceFee);
        sb.append(", medTransId=").append(medTransId);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}